package com.avengers.core.model.db;

import com.avengers.core.bean.enums.SymbolEnum;

/**
 * 关键字
 *
 * @author yu.wang
 * @since 2018-04-11 下午8:43
 */
public interface SqlKey {
    String SELECT = "SELECT ";
    String UPDATE = "UPDATE ";
    String DELETE = "DELETE ";
    String INSERT = "INSERT ";
    String INTO = " INTO ";
    String SET = " SET ";
    String WHERE = " WHERE ";
    String WHERE_1 = WHERE + "1 = 1 ";
    String FROM = " FROM ";
    String AND = " AND ";
    String OR = " OR ";
    String IN = " IN ";
    String NOT_IN = " NOT IN ";
    String LIKE = " LIKE ";
    String JOIN = " JOIN ";
    String LEFT_JOIN = " LEFT JOIN ";
    String RIGHT_JOIN = " RIGHT JOIN ";
    String INNER_JOIN = " INNER JOIN ";
    String ON = " ON ";
    String HAVING = " HAVING ";
    String EXISTS = " EXISTS ";
    String NOT_EXISTS = " NOT EXISTS ";
    String NOT_LIKE = " NOT LIKE ";
    String GROUP_BY = "GROUP BY ";
    String ORDER_BY = "ORDER BY ";
    String LIMIT = "LIMIT ";
    String IS_NULL = " IS NULL ";
    String IS_NOT_NULL = " IS NOT NULL ";
    String SPACE = SymbolEnum.space.string;
    String EMPTY = SymbolEnum.empty.string;
    String SQL_EMPTY = "''";
    String COMMA = SymbolEnum.comma.string;
    String BRACKETS_LEFT = " ( ";
    String BRACKETS_RIGHT = " ) ";
    String NOT_EQUAL = " != ";
    String DOT = ".";
    String EQUAL = " = ";
    String PARAM = " ? ";
    String PERCENT = "%";
    String LESSER = " < ";
    String LESSER_EQUAL = " <= ";
    String GREATER = " > ";
    String GREATER_EQUAL = " >= ";
    String ALL = " * ";
    String QUOTES = "'";
    String SQL_QUOTES = SymbolEnum.sqlQuotes.string;
    String FOR_UPDATE = " FOR UPDATE";
    String WHEN = " WHEN ";
    String THEN = " THEN ";
    String CASE = " CASE ";
    String ELSE = " ELSE ";
    String END = " END ";

    String FUNCTION_FIND_IN_SET = " FIND_IN_SET";
    String IS_EMPTY = " = ''";
    String IS_NOT_EMPTY = " <> ''";
}
